/*
 * Copyright (C) 2021 Baidu, Inc. All Rights Reserved.
 */
package com.chukun.rpc.consumer.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.chukun.rpc.consumer.annotation.TinyRpcReference;
import com.chukun.rpc.facade.user.User;
import com.chukun.rpc.facade.user.UserFacade;

/**
 * <p>消费端接口<p/>
 *
 * @author chukun
 * @version 1.0
 * @since 1.0-SNAPSHOT
 */
@RestController
public class UserController {

    @TinyRpcReference(version = "1.0", timeout = 10000)
    private UserFacade userFacade;

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String sayHello() {
        return userFacade.hello(100L);
    }
}
